package com.aabbc.activemq.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

/**
 * Consumer
 *
 * @author: <a href="mailto:chenfenghai@oristartech.com">chenfenghai</a>
 * @version: 1.0
 * @date: 2019-11-27 15:59
 */
@Component
public class OrderConsumer {

    @SendTo("out.queue")
    @JmsListener(destination = "mytest.queue")
    public String receiveQueue(String text) {
        System.out.println("Consumer收到的信息为: "+text);
        return "return message "+text;
    }
}
